<!doctype html>
<html>
<head>
<meta charset='UTF-8'><meta name='viewport' content='width=device-width initial-scale=1'>

<link href='https://fonts.loli.net/css?family=Merriweather:900,900italic,300,300italic&subset=latin-ext' rel='stylesheet' type='text/css' /><link href='https://fonts.loli.net/css?family=Lato:900,300&subset=latin-ext' rel='stylesheet' type='text/css' /><style type='text/css'>html {overflow-x: initial !important;}:root { --bg-color:#ffffff; --text-color:#333333; --select-text-bg-color:#B5D6FC; --select-text-font-color:auto; --monospace:"Lucida Console",Consolas,"Courier",monospace; --title-bar-height:20px; }
.mac-os-11 { --title-bar-height:28px; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; inset: 0px; font-size: 1rem; line-height: 1.42857; overflow-x: hidden; background: inherit; tab-size: 4; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; overflow-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; padding-top: 36px; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export li, .typora-export p { white-space: pre-wrap; }
.typora-export .task-list-item input { pointer-events: none; }
@media screen and (max-width: 500px) {
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  #write { padding-left: 20px; padding-right: 20px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write li > figure:last-child { margin-bottom: 0.5rem; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; image-orientation: from-image; }
button, input, select, textarea { color: inherit; font: inherit; }
input[type="checkbox"], input[type="radio"] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
p { line-height: inherit; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 4; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.7); color: rgb(85, 85, 85); border-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type="checkbox"] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure > table { margin: 0px; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 32px; }
.CodeMirror-gutters { border-right: 0px; background-color: inherit; }
.CodeMirror-linenumber { user-select: none; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background: inherit; position: relative !important; }
.md-fences-adv-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; background: 0px 0px; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; -webkit-tap-highlight-color: transparent; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li blockquote { margin: 1rem 0px; }
li { margin: 0px; position: relative; }
blockquote > :last-child { margin-bottom: 0px; }
blockquote > :first-child, li > :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print {
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid; break-before: avoid; font-variant-ligatures: no-common-ligatures; }
  #write { margin-top: 0px; padding-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  .typora-export #write { break-after: avoid; }
  .typora-export #write::after { height: 0px; }
  .is-mac table { break-inside: avoid; }
  .typora-export-show-outline .typora-export-sidebar { display: none; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background: rgb(204, 204, 204); display: block; overflow-x: hidden; }
p > .md-image:only-child:not(.md-img-error) img, p > img:only-child { display: block; margin: auto; }
#write.first-line-indent p > .md-image:only-child:not(.md-img-error) img { left: -2em; position: relative; }
p > .md-image:only-child { display: inline-block; width: 100%; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
.MathJax_ref { fill: currentcolor; }
[contenteditable="true"]:active, [contenteditable="true"]:focus, [contenteditable="false"]:active, [contenteditable="false"]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item > input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); border: none; }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) {
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: "."; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.6; font-family: var(--monospace); }
code { text-align: left; vertical-align: initial; }
a.md-print-anchor { white-space: pre !important; border-width: initial !important; border-style: none !important; border-color: initial !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; background: 0px 0px !important; text-decoration: initial !important; text-shadow: initial !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: "Segoe UI Symbol", sans-serif; }
.md-diagram-panel > svg { max-width: 100%; }
[lang="flow"] svg, [lang="mermaid"] svg { max-width: 100%; height: auto; }
[lang="mermaid"] .node text { font-size: 1rem; }
table tr th { border-bottom: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }
mark { background: rgb(255, 255, 0); color: rgb(0, 0, 0); }
.md-html-inline .md-plain, .md-html-inline strong, mark .md-inline-math, mark strong { color: inherit; }
.md-expand mark .md-meta { opacity: 0.3 !important; }
mark .md-meta { color: rgb(0, 0, 0); }
@media print {
  .typora-export h1, .typora-export h2, .typora-export h3, .typora-export h4, .typora-export h5, .typora-export h6 { break-inside: avoid; }
}
.md-diagram-panel .messageText { stroke: none !important; }
.md-diagram-panel .start-state { fill: var(--node-fill); }
.md-diagram-panel .edgeLabel rect { opacity: 1 !important; }
.md-fences.md-fences-math { font-size: 1em; }
.md-fences-advanced:not(.md-focus) { padding: 0px; white-space: nowrap; border: 0px; }
.md-fences-advanced:not(.md-focus) { background: inherit; }
.typora-export-show-outline .typora-export-content { max-width: 1440px; margin: auto; display: flex; flex-direction: row; }
.typora-export-sidebar { width: 300px; font-size: 0.8rem; margin-top: 80px; margin-right: 18px; }
.typora-export-show-outline #write { --webkit-flex:2; flex: 2 1 0%; }
.typora-export-sidebar .outline-content { position: fixed; top: 0px; max-height: 100%; overflow: hidden auto; padding-bottom: 30px; padding-top: 60px; width: 300px; }
@media screen and (max-width: 1024px) {
  .typora-export-sidebar, .typora-export-sidebar .outline-content { width: 240px; }
}
@media screen and (max-width: 800px) {
  .typora-export-sidebar { display: none; }
}
.outline-content li, .outline-content ul { margin-left: 0px; margin-right: 0px; padding-left: 0px; padding-right: 0px; list-style: none; }
.outline-content ul { margin-top: 0px; margin-bottom: 0px; }
.outline-content strong { font-weight: 400; }
.outline-expander { width: 1rem; height: 1.42857rem; position: relative; display: table-cell; vertical-align: middle; cursor: pointer; padding-left: 4px; }
.outline-expander::before { content: ""; position: relative; font-family: Ionicons; display: inline-block; font-size: 8px; vertical-align: middle; }
.outline-item { padding-top: 3px; padding-bottom: 3px; cursor: pointer; }
.outline-expander:hover::before { content: ""; }
.outline-h1 > .outline-item { padding-left: 0px; }
.outline-h2 > .outline-item { padding-left: 1em; }
.outline-h3 > .outline-item { padding-left: 2em; }
.outline-h4 > .outline-item { padding-left: 3em; }
.outline-h5 > .outline-item { padding-left: 4em; }
.outline-h6 > .outline-item { padding-left: 5em; }
.outline-label { cursor: pointer; display: table-cell; vertical-align: middle; text-decoration: none; color: inherit; }
.outline-label:hover { text-decoration: underline; }
.outline-item:hover { border-color: rgb(245, 245, 245); background-color: var(--item-hover-bg-color); }
.outline-item:hover { margin-left: -28px; margin-right: -28px; border-left: 28px solid transparent; border-right: 28px solid transparent; }
.outline-item-single .outline-expander::before, .outline-item-single .outline-expander:hover::before { display: none; }
.outline-item-open > .outline-item > .outline-expander::before { content: ""; }
.outline-children { display: none; }
.info-panel-tab-wrapper { display: none; }
.outline-item-open > .outline-children { display: block; }
.typora-export .outline-item { padding-top: 1px; padding-bottom: 1px; }
.typora-export .outline-item:hover { margin-right: -8px; border-right: 8px solid transparent; }
.typora-export .outline-expander::before { content: "+"; font-family: inherit; top: -1px; }
.typora-export .outline-expander:hover::before, .typora-export .outline-item-open > .outline-item > .outline-expander::before { content: "−"; }
.typora-export-collapse-outline .outline-children { display: none; }
.typora-export-collapse-outline .outline-item-open > .outline-children, .typora-export-no-collapse-outline .outline-children { display: block; }
.typora-export-no-collapse-outline .outline-expander::before { content: "" !important; }
.typora-export-show-outline .outline-item-active > .outline-item .outline-label { font-weight: 700; }
.md-inline-math-container mjx-container { zoom: 0.95; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background: inherit; }
.CodeMirror-scroll { overflow: auto hidden; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right: 1px solid rgb(221, 221, 221); background: inherit; white-space: nowrap; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background: inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background: inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; outline: 0px; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: auto hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 10px; z-index: 3; overflow-y: hidden; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; background: 0px 0px !important; border: none !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-radius: 0px; border-width: 0px; background: 0px 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; overflow-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; }
.CodeMirror-wrap pre { overflow-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right: 30px solid transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right: none; width: auto; }
.CodeMirror-linebackground { position: absolute; inset: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background: rgba(255, 255, 0, 0.4); }
span.cm-underlined { text-decoration: underline; }
span.cm-strikethrough { text-decoration: line-through; }
.cm-tw-syntaxerror { color: rgb(255, 255, 255); background-color: rgb(153, 0, 0); }
.cm-tw-deleted { text-decoration: line-through; }
.cm-tw-header5 { font-weight: 700; }
.cm-tw-listitem:first-child { padding-left: 10px; }
.cm-tw-box { border-style: solid; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-color: inherit; border-top-width: 0px !important; }
.cm-tw-underline { text-decoration: underline; }
@media print {
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


@include-when-export url(https://fonts.loli.net/css?family=Merriweather:900,900italic,300,300italic&subset=latin-ext);
@include-when-export url(https://fonts.loli.net/css?family=Lato:900,300&subset=latin-ext);

:root {
	--control-text-color: #777;
}

/**
 * forked from pixyll.com
 * MIT license
 */

h1,
.h1,
.f1 {
	font-size: 2rem;
	line-height: 2.5rem;
}
h2,
.h2,
.f2 {
	font-size: 1.5rem;
	line-height: 2rem;
}
h3,
.h3,
.f3 {
	font-size: 1.25rem;
	line-height: 1.5rem;
}
p,
.p,
.f4,
h4,
h5,
h6,
dl,
ol,
ul,
pre[cid],
div[cid],
#typora-source {
	font-size: 1.125rem;
	line-height: 1.5rem;
}

h4 {
	font-size: 1.13rem;
}
/*
 Pixyll
 A simple, beautiful theme for Jekyll that emphasizes content rather than aesthetic fluff.
 Best served with BASSCSS (http://jxnblk.github.io/basscss)
 Crafted with <3 by John Otander (@4lpine) - ©2015 John Otander MIT License http://opensource.org/licenses/MIT

*/

body {
	font-family: "Merriweather", "PT Serif", Georgia, "Times New Roman", "STSong", 'Segoe UI Emoji', Serif;
	line-height: 1.5rem;
	font-weight: 400;
}

#write {
	max-width: 914px;
	color: #333;
}

@media only screen and (min-width: 1400px) {
	#write {
		max-width: 1100px;
	}
}

@media only screen and (min-width: 1700px) {
	#write {
		max-width: 1200px;
	}
}

img {
	width: auto;
	max-width: 100%;
}
body {
	font-size: 1.5rem;
	box-sizing: border-box;
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
}

.ty-table-edit {
	background: #ededed;
}

table {
	width: 100%;
	font-size: 1.125rem;
}
table > thead > tr > th,
table > thead > tr > td,
table > tbody > tr > th,
table > tbody > tr > td,
table > tfoot > tr > th,
table > tfoot > tr > td {
	padding: 12px;
	line-height: 1.2;
	vertical-align: top;
	border-top: 1px solid #333;
}
table > thead > tr > th {
	vertical-align: bottom;
	border-bottom: 2px solid #333;
}
table > caption + thead > tr:first-child > th,
table > caption + thead > tr:first-child > td,
table > colgroup + thead > tr:first-child > th,
table > colgroup + thead > tr:first-child > td,
table > thead:first-child > tr:first-child > th,
table > thead:first-child > tr:first-child > td {
	border-top: 0;
}
table > tbody + tbody {
	border-top: 2px solid #333;
}
p {
	font-weight: 300;
	line-height: 1.5;
}
abbr {
	border-bottom: 1px black dotted;
	cursor: help;
}
pre,
code {
	font-family: Menlo, Monaco, "Courier New", monospace;
}

code,
.md-fences  {
	color: #7a7a7a;
}

.md-fences {
	padding: 1.125em;
	margin-bottom: 0.88em;
	font-size: 1rem;
	border: 1px solid #7a7a7a;
	padding-bottom: 0.5rem;
	padding-top: 0.5rem;
}

blockquote {
	padding: 1.33em;
	font-style: italic;
	border-left: 5px solid #7a7a7a;
	color: #555;
}
blockquote em {
	color: #000;
}
blockquote footer {
	font-size: .85rem;
	font-style: normal;
	background-color: #fff;
	color: #7a7a7a;
	border-color: transparent;
}
h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4,
h5,
.h5,
h6,
.h6 {
	font-family: "Lato", 'Helvetica Neue', Helvetica, sans-serif;
	font-weight: bold;
	line-height: 1.2;
	margin: 1em 0 0.5em;
}
@media screen and (min-width: 48em) {
	.h1,
	h1 {
		font-size: 3.250rem;
	}
	.h2,
	h2 {
		font-size: 2.298rem;
	}
	.h3,
	h3 {
		font-size: 1.625rem;
	}
	.h4,
	h4 {
		font-size: 1.3rem;
	}
	#write>h4.md-focus:before,
	#write>h5.md-focus:before,
	#write>h6.md-focus:before{
		top: 1px;
	}
	.p,
	p,
	li {
		font-size: 1.25rem;
		line-height: 1.8;
	}
	table {
		font-size: 1.25rem;
	}
}
@media (max-width: 48em) {
	blockquote {
		margin-left: 1rem;
		margin-right: 0;
		padding: 0.5em;
	}
	.h1,
	h1 {
		font-size: 2.827rem;
	}
	.h2,
	h2 {
		font-size: 1.999rem;
	}
	.h3,
	h3 {
		font-size: 1.413rem;
	}
	.h4,
	h4 {
		font-size: 1.3rem;
	}
}
@media screen and (min-width: 64em) {
	.h1,
	h1 {
		font-size: 4.498rem;
	}
	.h2,
	h2 {
		font-size: 2.29rem;
	}
	.h3,
	h3 {
		font-size: 1.9rem;
	}
	.h4,
	h4 {
		font-size: 1.591rem;
	}
	#write>h4.md-focus:before{
		top:4px;
	}
}
a {
	color: #463F5C;
	text-decoration: underline;
}

#write {
	padding-top: 2rem;
}

#write pre.md-meta-block {
	min-height: 35px;
	padding: 0.5em 1em;
	white-space: pre;
	border: 0px;

	border-left: 30px #f8f8f8 solid;
	border-right: 30px #f8f8f8 solid;
	width: 100vw;
	max-width: calc(100% + 60px);

	margin-left: -30px;
	margin-bottom: 2em;
	margin-top: -2010px;
	padding-top: 2000px;
	padding-bottom: 10px;
	line-height: 1.5em;
	color: #7a7a7a;
	background-color: #fafafa;
	font-family: 'Lato', 'Helvetica Neue', Helvetica, sans-serif;
	font-weight: 300;
	clear: both;
	padding-left: 0;
	font-size:1.125rem;
}
.md-image>.md-meta {
	color: #463F5C
}
.footnotes {
	font-size:1.1rem;
}
.md-tag {
	font-family: 'Lato', 'Helvetica Neue', Helvetica, sans-serif;
}
.code-tooltip {
	background: white;
}
.code-tooltip-content {
	font-size: 1.1rem;
}

.task-list{
	padding-left: 0;
}

.md-task-list-item {
	padding-left:34px;
}

.md-task-list-item > input{
	width: 1.25rem;
	height: 1.25rem;
	display: block;
	-webkit-appearance: initial;
	top: -0.2rem;
	margin-left: -1.6em;
	margin-top: calc(1rem - 7px);
	border: none;
}

.md-task-list-item > input:focus{
	outline: none;
	box-shadow: none;
}

.md-task-list-item > input:before{
	border: 1px solid #555;
	border-radius: 1.5rem;
	width: 1.5rem;
	height: 1.5rem;
	background: #fff;
	content: ' ';
	transition: background-color 200ms ease-in-out;
	display: block;
}

.md-task-list-item > input:checked:before,
.md-task-list-item > input[checked]:before{
	background: #333;
	border-width: 2px;
	display:inline-block;
	transition: background-color 200ms ease-in-out;
}

.md-task-list-item > input:checked:after,
.md-task-list-item > input[checked]:after {
	opacity: 1;
}

.md-task-list-item > input:after {
	opacity: 1;
	-webkit-transition: opacity 0.05s ease-in-out;
	-moz-transition: opacity 0.05s ease-in-out;
	transition: opacity 0.05s ease-in-out;
	-webkit-transform: rotate(-45deg);
	-moz-transform: rotate(-45deg);
	transform: rotate(-45deg);
	position: absolute;
	top: 0.4375rem;
	left: 0.28125rem;
	width: 0.9375rem;
	height: 0.5rem;
	border: 3px solid #fff;
	border-top: 0;
	border-right: 0;
	content: ' ';
	opacity: 0;
}

.md-tag {
	color:inherit;
}

.md-toc:focus .md-toc-content{
	margin-top: 19px;
}

#typora-sidebar {
	font-size:1rem !important;
}

.html-for-mac #typora-sidebar {
	background-color:white;
}

.outline-content li, .outline-content ul {
	font-size:1rem !important;
}

.outline-title {
	line-height: inherit;
	margin-top: 10px;
}

.outline-expander {
	width: 18px;
}

.outline-expander:before {
 	content: "+";
	font-family: inherit;
	color: rgb(108, 108, 108); 
  font-size: 1.5rem;
 	top: -0.1rem;
}

.outline-expander:hover:before {
	content: "+";
}

.outline-item-open>.outline-item>.outline-expander:before{
	content: "-";
}

/** source code mode */
#typora-source {
	font-family: Courier, monospace;
    color: #6A6A6A;
}

.os-windows #typora-source {
	font-family: inherit;
}

.cm-s-typora-default .cm-header, 
.cm-s-typora-default .cm-property,
.CodeMirror.cm-s-typora-default div.CodeMirror-cursor {
	color: #428bca;
}

.cm-s-typora-default .cm-atom, .cm-s-typora-default .cm-number {
	color: #777777;
}

.md-diagram-panel {
	margin-top: 24px;
	margin-left: -1.2em;
}

.md-mathjax-midline {
	background: #fafafa;
}

.enable-diagrams pre.md-fences[lang="sequence"] .code-tooltip,
.enable-diagrams pre.md-fences[lang="flow"] .code-tooltip,
.enable-diagrams pre.md-fences[lang="mermaid"] .code-tooltip {
    bottom: -3.4em;
}

.dropdown-menu .divider {
	border-color: #e5e5e5;
}


</style><title>README</title>
</head>
<body class='typora-export'><div class='typora-export-content'>
<div id='write'  class=''><style>
  .stat{
    border-radius: 0.5rem;
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    color: #fff
  }
  .stat.unwork{
    background-color: #006dd9;
  }
  .stat.worked{
    background-color: #00b200;
  }
  .stat.unplan{
    background-color: #535362;
  }
</style><h1 id='餐厅游戏开发文档'><span>餐厅游戏开发文档</span></h1><h3 id='概述'><span>概述</span></h3><p><span>由于记错了大作业提交日期, 所以匆匆完成了这次的结课作业提高版, 代码写的属实是有点没有经过细细推敲, 有一些可选需求也是按照简化需求的版本完成的, 游戏的参数也没有经过过多的测试(这导致节奏时快时慢, 非常容易赔钱┗( T﹏T )┛). 如果实在是观感不佳还可以看看</span><a href='https://baidu.liukairui.cc/class-ending-homework/basic/'><span>结课作业基础版</span></a></p><h3 id='项目目标'><span>项目目标</span></h3><p><span>通过实现一个类游戏的餐厅经营模拟，练习移动端 HTML 页面布局及样式实现,以及在 JavaScript 使用面向对象编程，在你的设计中应用合适的设计模式.</span></p><p><img src="./design.png" referrerpolicy="no-referrer" alt="fd"></p><h3 id='编码要求'><span>编码要求</span></h3><p><span>参考</span><a href='https://b.bdstatic.com/searchbox/icms/searchbox/img/餐厅游戏原型图.png'><span>原型图</span></a><span>，使用 HTML+CSS+JavaScript 实现兼容移动端的餐厅游戏，要实现厨师、顾客以及你自己三个角色的关键操作，完成从顾客等位、点菜、烹饪、用餐、支付的一系列状态变更的数据、信息、交互、展现的变化及处理。</span></p><p><span>本练习提供的</span><a href='https://b.bdstatic.com/searchbox/icms/searchbox/img/restaurant.zip'><span>附件</span></a><span>中，包括了开发本练习所需要的图片资源。</span></p><h4 id='用例描述'><span>用例描述：</span></h4><p><strong><span>涉及的单位元素：</span></strong></p><ul><li><p><span class="stat worked"><span>完成</span></span><span> 时间元素：显示在左上角，初始值为W0，D0</span></p><ul><li><span class="stat worked"><span>完成</span></span><span> W：周，W+数字，表示第几周，每过7天，W后面的数字增加1</span></li><li><span class="stat worked"><span>完成</span></span><span> D：天，D+数字，表示星期几，每周有7天，所以D有D1~D7，每一天有 X 秒（X 自定义，建议可以为240）。D7结束后，D变回D1，W增加1</span></li></ul></li><li><p><span class="stat worked"><span>完成</span></span><span> 金钱元素：显示在右上角，初始值为500（可自定义）</span></p></li></ul><p><span>金钱变化发生在以下几个动作：</span></p><ul><li><span class="stat worked"><span>完成</span></span><span> 顾客支付时，增加顾客支付的金钱数量</span></li><li><span class="stat worked"><span>完成</span></span><span> 厨师开始做菜时，减去做菜的成本，当成本大于现有现金时，显示为负值</span></li><li><span class="stat worked"><span>完成</span></span><span> D7结束的时候，支付厨师的工资，每个厨师的工资 = 向上取整（按厨师实际工作的天数 / 7 * 周薪）。每个厨师的周薪假设为 ￥140（可自定义）</span></li><li><span class="stat worked"><span>完成</span></span><span> 解雇厨师时，支付厨师的当周工资及额外的解雇费用，当周工资计算方式同上，解雇费用为一周工资。</span></li></ul><p><strong><span>餐厅中有三个角色：厨师、顾客 和 你</span></strong></p><p><strong><span>顾客的属性包括：</span></strong></p><ul><li><span class="stat worked"><span>完成</span></span><span> 姓名：顾客的姓名，开发者自行安排</span></li><li><span class="stat worked"><span>完成</span></span><span> 头像：顾客显示在界面的形象</span></li></ul><p><strong><span>顾客的行为包括：</span></strong></p><ul><li><span class="stat worked"><span>完成</span></span><span> 来到餐厅：顾客到餐厅，在同一天里，顾客可以不来，也可以来，且最多来一次</span></li><li><span class="stat worked"><span>完成</span></span><span> 等待接待：顾客到餐厅后，先在餐厅外面等候你接待；等候区最多容纳 X 位顾客（X自定义，建议为6）。当等候区人满的时候，如果有新顾客来到餐厅，他将会直接离开，不进入等候区，且今天都不会再来。</span></li><li><span class="stat worked"><span>完成</span></span><span> 放弃等位：顾客耐心有限，所以等待接待是有时间限制的，当超过等待时间 n 秒（n自定义，但建议小于 1D 的时间），顾客会放弃等位离开，且这天内都不会再来；</span></li><li><span class="stat unplan"><span>不计划完成</span></span><span>入座：当餐厅有空座，你点击等位的任何一个顾客头像，都会让排在第一位的顾客入座；当餐厅没有空座时，点击等位任何一个顾客头像时不做响应；</span></li><li><span class="stat worked"><span>完成</span></span><span> 入座简化需求：当餐厅有空座时，排等候第一位的顾客自动入座；</span></li><li><span class="stat worked"><span>完成</span></span><span> 点餐：顾客入座后，自动弹起点餐界面，此时时间停止，顾客开始点餐，按照界面中提供的菜肴和点餐规则进行点餐（菜肴名字也可以自定义，但注意如果菜肴名字过长，在界面的其它显示菜肴的地方注意做超长截断的体验优化）。顾客完成点餐，点餐信息发送给下一个环节，点餐界面消失，时间继续走动，顾客开始等候上菜。当顾客点餐不符合规则时，完成点餐的按钮呈现不可点击样式，且点击不做响应；</span></li><li><span class="stat worked"><span>完成</span></span><span> 放弃点餐：顾客若这时放弃点餐，则直接离开位置和餐厅，且今天不再来，然后点餐界面消失，时间继续走动；</span></li><li><span class="stat worked"><span>完成</span></span><span> 等待上菜：每道菜的等候忍耐时间不同，凉菜和饮品的等候耐心时间较短，主菜的耐心时间较长；</span></li><li><span class="stat worked"><span>完成</span></span><span> 用餐：每上一个菜后，顾客开始用餐，每个菜有一个用餐时间，凉菜和饮品的用餐耐心时间较短，主菜的用餐时间较长；用餐是串行的，只有完成一个菜的用餐才会进行下一个菜，用餐顺序按上菜顺序进行。如果顾客的某一个菜未在等候耐心时间到达终点前上，则顾客放弃这个菜，将不会进行这个菜的用餐和支付；</span></li><li><span class="stat unplan"><span>不计划完成</span></span><span>等餐太久生气：当顾客点的所有菜都未按时上来时，顾客进入生气状态，顾客头像旁边出现心形按钮，需要你去安抚顾客，顾客才会离开，否则顾客会一直待到当天结束时才会离开餐厅；顾客在这种状态下不会进行支付；</span></li><li><span class="stat worked"><span>完成</span></span><span> 等餐太久生气的简化需求：顾客进入生气状态后弹提示“XXX顾客没有吃上任何东西，生气离开”，然后立即离开餐厅；</span></li><li><span class="stat unplan"><span>不计划完成</span></span><span> 支付：当顾客完成用餐，会出现一个支付按钮，当你去点击支付按钮后，对顾客完成用餐的菜进行支付，支付完成后，顾客离开餐厅；如果你一直未点击支付按钮，顾客会待一定时间（也可以是待到餐厅结束）后自行支付后离开</span></li><li><span class="stat worked"><span>完成</span></span><span> 支付简化需求：顾客完成用餐后，弹提示“XXX完成用餐，支付XXX元”，然后立即支付离开餐厅；</span></li><li><span class="stat worked"><span>完成</span></span><span> 离开餐厅：当顾客支付或是生气离开后，座位空出来。</span></li></ul><p><strong><span>厨师的行为包括：</span></strong></p><ul><li><span class="stat worked"><span>完成</span></span><span> 空闲：空着，嗯嗯</span></li><li><span class="stat worked"><span>完成</span></span><span> 做菜：每个菜有个进度，凉菜和饮品的速度较快，主菜较慢；做菜需要成本，开始做菜时，会扣除这个菜的成本，每个菜成本是独立的，成本由开发者自定；</span></li><li><span class="stat unplan"><span>不计划完成</span></span><span>做好菜：做好菜以后状态发生改变，等待你上菜，上完菜以后首先进入下一个状态（空闲或是做下一个菜），如果做好菜一直没有上菜，等待一段时间后，这个菜作废掉，厨师进入下一个状态（空闲或是做下一个菜）；如果做的菜因为时间过长，已经没有顾客需要，则直接复用上一个等待上菜的逻辑；</span></li><li><span class="stat worked"><span>完成</span></span><span> 做好菜的简化需求：每个菜都是绑定顾客，做好了自动上给顾客，无需有上菜的交互操作；这种时候，如果做好的菜顾客已经不要，可以是在顾客不要时就自动停止做该菜，或是做好菜以后菜自动作废。</span></li></ul><p><strong><span>你的行为包括：</span></strong></p><ul><li><span class="stat worked"><span>完成</span></span><span> 招聘厨师：在界面中点击招聘厨师按钮，并进行二次确认，厨师最多6名；</span></li><li><span class="stat worked"><span>完成</span></span><span> 解雇厨师：在界面中解雇空闲的厨师，并进行二次确认，厨师最少一名；</span></li><li><span class="stat worked"><span>完成</span></span><span> 招聘和解雇的简化需求：（以上两个需求也可以简化成为固定厨师数量，不可招聘也不可解雇）；</span></li><li><span class="stat worked"><span>完成</span></span><span> 安排厨师做菜：界面上无操作，实现一个逻辑，当顾客点完菜后，安排厨师做菜；</span></li><li><span class="stat worked"><span>完成</span></span><span>  加速厨师（可选）：当厨师做菜时，点击厨师头像能加速做菜进度；</span></li><li><span class="stat unplan"><span>不计划完成</span></span><span>引导顾客入座：当餐厅有空位时，点击等候区的顾客，可以引导顾客做等位区进入座位进行点餐：同顾客用例中描述；</span></li><li><span class="stat worked"><span>完成</span></span><span> 引导顾客入座简化需求：当餐厅有空位时，自动让等候区第一位顾客入座，无需点击操作；</span></li><li><span class="stat unplan"><span>不计划完成</span></span><span>：当厨师做好一个菜时，如果有顾客点了这个菜，则在这个菜旁边出现上菜按钮，点击后给这个顾客上菜；如果超过一定时间没有上菜，则这个菜作废；</span></li><li><span class="stat worked"><span>完成</span></span><span> 上菜的简化需求：厨师每做一个菜都是定好顾客的，不需要你做上菜的动作，菜做好了自动上菜；</span></li><li><span class="stat unplan"><span>不计划完成</span></span><span>收费：当顾客完成用餐后，在顾客头像旁出现金钱按钮，点击完成收费行为，其他逻辑同顾客用例中描述；</span></li><li><span class="stat worked"><span>完成</span></span><span> 收费的简化需求：当顾客完成用餐后，自动收费，不需要你点击；</span></li><li><span class="stat unplan"><span>不计划完成</span></span><span>安抚顾客：顾客因为所有菜等候时间都超时而进入生气状态后，会出现一个心形按钮，你点击按钮后，顾客会离开餐厅；</span></li><li><span class="stat worked"><span>完成</span></span><span>  安抚顾客简化需求：顾客直接走掉，不需要你做什么。</span></li></ul><h3 id='要求'><span>要求</span></h3><ul><li><span class="stat worked"><span>完成</span></span><span> 兼容性满足PC Chrome下的移动调试窗口 + 手机自带浏览器，不需要兼容微信，UC等第三方浏览场景；</span></li><li><span class="stat worked"><span>完成</span></span><span> 代码风格优雅，代码结构合理，技术设计恰到好处；</span></li><li><span class="stat worked"><span>完成</span></span><span> 框架使用方面，建议不使用框架实现一遍，然后再使用框架实现一遍；</span></li><li><span class="stat worked"><span>完成</span></span><span> 只能附件中提供的图片资源，其他样式均使用 CSS 实现；如果有额外自己添加的需求场景，可以自行按需求增加图片资源；</span></li><li><span class="stat worked"><span>完成</span></span><span> 提供的原始图片资源体积较大，根据实际需要进行性能优化所需要的压缩；</span></li></ul><h3 id='todo'><span>Todo</span></h3><ul><li><span class="stat unwork"><span>计划中</span></span><span> 调整默认参数</span></li><li><span class="stat unwork"><span>计划中</span></span><span> 优化一下JS吧</span></li><li><span class="stat unwork"><span>计划中</span></span><span> 写完上面不计划完成的</span></li></ul><h3 id='玩法介绍'><span>玩法介绍</span></h3><ul><li><span>游戏中会随机出现顾客, 你需要为用户点单, 菜单自带合法性校验</span></li><li><span>点击加号招募厨师</span></li><li><span>长按厨师解雇厨师</span></li><li><span>在厨师做菜时双击厨师加速烹饪</span></li></ul><h3 id='游戏参数'><span>游戏参数</span></h3><ul><li><p><span>最大可用厨师数: 6</span></p></li><li><p><span>最大可用餐桌数: 4</span></p></li><li><p><span>等位区大小: 5</span></p></li><li><p><span>初始化资金: 500</span></p></li><li><p><span>厨师周薪: 140</span></p></li><li><p><span>厨师解雇违约金: 140</span></p></li><li><p><span>每日时长: 40000 ms</span></p></li><li><p><span>用户等位忍耐时长: 15000 ms</span></p></li><li><p><span>每次双击厨师减少剩余时间: 700 ms</span></p></li><li><p><span>新客户出现平均间隔: 10000 ms</span></p></li><li><p><span>食物列表  </span></p><figure><table><thead><tr><th style='text-align:left;' ><span>id</span></th><th style='text-align:left;' ><span>食物名</span></th><th style='text-align:left;' ><span>售价</span></th><th style='text-align:left;' ><span>顾客最长等待时间</span></th><th style='text-align:left;' ><span>顾客食用时间</span></th><th style='text-align:left;' ><span>成本</span></th><th style='text-align:left;' ><span>制作用时</span></th></tr></thead><tbody><tr><td style='text-align:left;' ><span>0</span></td><td style='text-align:left;' ><span>&#39;凉拌SAN&#39;</span></td><td style='text-align:left;' ><span>6</span></td><td style='text-align:left;' ><span>7000</span></td><td style='text-align:left;' ><span>5000</span></td><td style='text-align:left;' ><span>4</span></td><td style='text-align:left;' ><span>3500</span></td></tr><tr><td style='text-align:left;' ><span>1</span></td><td style='text-align:left;' ><span>&#39;冷切DOM&#39;</span></td><td style='text-align:left;' ><span>4</span></td><td style='text-align:left;' ><span>7000</span></td><td style='text-align:left;' ><span>5000</span></td><td style='text-align:left;' ><span>3</span></td><td style='text-align:left;' ><span>3500</span></td></tr><tr><td style='text-align:left;' ><span>2</span></td><td style='text-align:left;' ><span>&#39;UL炖LI&#39;</span></td><td style='text-align:left;' ><span>12</span></td><td style='text-align:left;' ><span>10000</span></td><td style='text-align:left;' ><span>7000</span></td><td style='text-align:left;' ><span>8</span></td><td style='text-align:left;' ><span>5000</span></td></tr><tr><td style='text-align:left;' ><span>3</span></td><td style='text-align:left;' ><span>&#39;红烧HEAD&#39;</span></td><td style='text-align:left;' ><span>15</span></td><td style='text-align:left;' ><span>10000</span></td><td style='text-align:left;' ><span>7000</span></td><td style='text-align:left;' ><span>10</span></td><td style='text-align:left;' ><span>5000</span></td></tr><tr><td style='text-align:left;' ><span>4</span></td><td style='text-align:left;' ><span>&#39;酥炸ECharts&#39;</span></td><td style='text-align:left;' ><span>18</span></td><td style='text-align:left;' ><span>10000</span></td><td style='text-align:left;' ><span>7000</span></td><td style='text-align:left;' ><span>12</span></td><td style='text-align:left;' ><span>5000</span></td></tr><tr><td style='text-align:left;' ><span>5</span></td><td style='text-align:left;' ><span>&#39;炙烤CSS&#39;</span></td><td style='text-align:left;' ><span>16</span></td><td style='text-align:left;' ><span>10000</span></td><td style='text-align:left;' ><span>7000</span></td><td style='text-align:left;' ><span>12</span></td><td style='text-align:left;' ><span>5000</span></td></tr><tr><td style='text-align:left;' ><span>6</span></td><td style='text-align:left;' ><span>&#39;清蒸DIV&#39;</span></td><td style='text-align:left;' ><span>12</span></td><td style='text-align:left;' ><span>10000</span></td><td style='text-align:left;' ><span>7000</span></td><td style='text-align:left;' ><span>8</span></td><td style='text-align:left;' ><span>5000</span></td></tr><tr><td style='text-align:left;' ><span>7</span></td><td style='text-align:left;' ><span>&#39;鲜榨flex&#39;</span></td><td style='text-align:left;' ><span>5</span></td><td style='text-align:left;' ><span>7000</span></td><td style='text-align:left;' ><span>5000</span></td><td style='text-align:left;' ><span>3</span></td><td style='text-align:left;' ><span>3500</span></td></tr><tr><td style='text-align:left;' ><span>8</span></td><td style='text-align:left;' ><span>&#39;小程序奶茶&#39;</span></td><td style='text-align:left;' ><span>6</span></td><td style='text-align:left;' ><span>7000</span></td><td style='text-align:left;' ><span>5000</span></td><td style='text-align:left;' ><span>4</span></td><td style='text-align:left;' ><span>3500</span></td></tr></tbody></table></figure></li><li><p><span>菜单</span></p><figure><table><thead><tr><th><span>类目</span></th><th><span>最少选购1</span></th><th><span>最多选购</span></th><th><span>可选食物ID</span></th></tr></thead><tbody><tr><td><span>&#39;凉菜(二选一,可不点)&#39;</span></td><td><span>0</span></td><td><span>1</span></td><td><span>&#39;0, 1&#39;</span></td></tr><tr><td><span>&#39;主菜(五选二,必点)&#39;</span></td><td><span>2</span></td><td><span>2</span></td><td><span>&#39;2, 3, 4, 5, 6&#39;</span></td></tr><tr><td><span>&#39;饮料(二选一,可不点)&#39;</span></td><td><span>0</span></td><td><span>1</span></td><td><span>&#39;7, 8&#39;</span></td></tr></tbody></table></figure></li><li><p><span>可用色彩风格: [&#39;gray&#39;, &#39;yellow&#39;, &#39;red&#39;, &#39;orange&#39;, &#39;purple&#39;, &#39;green&#39;, &#39;blue&#39;, &#39;brown&#39;]</span>
<span>debug.js:170</span></p></li><li><p><span>可用姓名: [&#39;Allen&#39;, &#39;Alice&#39;, &#39;Julie&#39;, &#39;Kathy&#39;, &#39;Vivian&#39;, &#39;Denise&#39;, &#39;Nancy&#39;, &#39;Mary&#39;, &#39;Emma&#39;, &#39;Olivia&#39;, &#39;Marilyn&#39;, &#39;Helen&#39;, &#39;Paula&#39;, &#39;Elaine&#39;, &#39;Carrie&#39;, &#39;Deborah&#39;, &#39;Charlotte&#39;, &#39;Eva&#39;, &#39;Jaime&#39;, &#39;Kathleen&#39;, &#39;Lydia&#39;, &#39;Jenny&#39;, &#39;Melody&#39;, &#39;Lucia&#39;, &#39;Frances&#39;, &#39;Ann&#39;, &#39;James&#39;, &#39;Kelly&#39;, &#39;Kevin&#39;, &#39;Rose&#39;, &#39;Lisa&#39;, &#39;Sandra&#39;, &#39;Donna&#39;, &#39;Carol&#39;, &#39;Cynthia&#39;, &#39;Brenda&#39;, &#39;Virginia&#39;, &#39;Pamela&#39;, &#39;Christine&#39;, &#39;Marie&#39;, &#39;Janet&#39;, &#39;Alma&#39;, &#39;Beth&#39;, &#39;Ellen&#39;, &#39;Gina&#39;, &#39;Anne&#39;, &#39;Irene&#39;, &#39;Annie&#39;, &#39;Edith&#39;, &#39;Jeanne&#39;]</span></p></li></ul><h3 id='代码结构'><span>代码结构</span></h3><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="" style="break-inside: unset;"><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 8.5px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation" style=""><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">.</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">├── css</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">│ &nbsp; ├── components.css &nbsp; &nbsp; &nbsp;  // 封装组件样式</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">│ &nbsp; ├── components.css.map</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">│ &nbsp; ├── components.less</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">│ &nbsp; ├── style.css &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 游戏样式表</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">│ &nbsp; ├── style.css.map</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">│ &nbsp; └── style.less</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">├── design &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  // 设计稿</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">│ &nbsp; ├── indexDesign.html</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">│ &nbsp; └── restaurant_prototype.png</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">├── document &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  // 开发文档</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">├── img &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 图片资源</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">├── index.html &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  // 游戏页面</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">├── js</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">│ &nbsp; ├── tool-kits.js &nbsp; &nbsp; &nbsp; &nbsp;  // 工具函数</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">│ &nbsp; ├── components.js &nbsp; &nbsp; &nbsp; &nbsp; // 封装组件JS</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">│ &nbsp; ├── StateManager.js &nbsp; &nbsp; &nbsp; // 状态管理器</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">│ &nbsp; ├── config.js &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 游戏参数配置</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">│ &nbsp; ├── GameTimer.js &nbsp; &nbsp; &nbsp; &nbsp;  // 全局计时器</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">│ &nbsp; ├── Cook.js &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 厨师对象</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">│ &nbsp; ├── Customer.js &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 顾客对象</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">│ &nbsp; ├── Resaturant.js &nbsp; &nbsp; &nbsp; &nbsp; // 餐厅对象JS</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">│ &nbsp; └── index.js &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  // 引入其他JS</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">├── package.json &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  // 用于使用ESLint与Prettier</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">├── package-lock.json</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">└── README.md &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 开发文档MarkDown</span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 567px;"></div><div class="CodeMirror-gutters" style="display: none; height: 567px;"></div></div></div></pre><h3 id='数据结构'><span>数据结构</span></h3><p><strong><span>Restautant类</span></strong></p><ul><li><p><span>方法: </span><code>build</code><span> 初始化</span></p></li><li><p><span>方法: </span><code>addProcess(ele,idx)</code><span> 添加进度条颜色</span></p></li><li><p><span>变量: </span><code>config</code><span> 配置文件</span></p></li><li><p><span>厨师相关</span></p><ul><li><span>方法: </span><code>toggleCookPlus()</code><span> 显示加号</span></li><li><span>方法: </span><code>hireCook()</code><span> 雇佣厨师</span></li><li><span>方法: </span><code>missCook(id)</code><span> 解雇厨师</span></li><li><span>变量: </span><code>cooksEle</code><span> cooks元素</span></li><li><span>变量: </span><code>cookPlusEle</code><span> 增加厨师按钮</span></li><li><span>变量: </span><code>cooks</code><span> 所有可用厨师</span></li><li><span>变量: </span><code>cooksOnServe</code><span> 在工作的厨师数量</span></li><li><span>变量: </span><code>cookDefaultEle</code><span> 默认厨师元素</span></li><li><span>变量: </span><code>cookEleArr</code><span> 所有厨师元素数组</span></li><li><span>变量: </span><code>cooksOnServe</code><span> 在工作的厨师数量</span></li></ul></li><li><p><span>顾客相关</span></p><ul><li><span>方法: </span><code>addCustom()</code><span> 增加顾客</span></li><li><span>方法: </span><code>delCustom(cus)</code><span> 删除顾客</span></li><li><span>方法: </span><code>saveMenu()</code><span> 保存菜单</span></li><li><span>变量: </span><code>customersEle</code><span> customers元素</span></li><li><span>变量: </span><code>customersWaitEle</code><span> 等待队列元素</span></li><li><span>变量: </span><code>customers</code><span> 所有客户数组</span></li><li><span>变量: </span><code>customersId</code><span> 当前客户ID</span></li><li><span>变量: </span><code>customerDefaultEle</code><span> 客户默认模板</span></li><li><span>变量: </span><code>customerEleArr</code><span> 在服务客户元素数组</span></li><li><span>变量: </span><code>foodWaitQueue</code><span> 没有分配厨师的餐</span></li></ul></li></ul><p><strong><span>Cook类</span></strong></p><ul><li><span>方法: </span><code>init</code><span> 初始化状态</span></li><li><span>方法: </span><code>work</code><span> 被雇佣</span></li><li><span>方法: </span><code>rest</code><span> 被解雇</span></li><li><span>方法: </span><code>toCooking</code><span> 开始做饭</span></li><li><span>方法: </span><code>createProcess</code><span> 创建工作进度</span></li><li><span>方法: </span><code>refreshProcess</code><span> 刷新工作状态</span></li><li><span>方法: </span><code>throwFood</code><span> 提交食物</span></li><li><span>方法: </span><code>cookFinish</code><span> 做完处理</span></li><li><span>方法: </span><code>tryNewDish</code><span> 尝试抓取新任务</span></li></ul><p><strong><span>Customer类</span></strong></p><ul><li><span>方法: </span><code>buildDom</code><span> 插入DOM</span></li><li><span>方法: </span><code>flashIndex</code><span> 更新等待队列</span></li><li><span>方法: </span><code>addTag</code><span> 添加进度条</span></li><li><span>方法: </span><code>startTimer</code><span> 开始计时</span></li><li><span>方法: </span><code>findEmptyDesk</code><span> 找到第一个空桌子</span></li><li><span>方法: </span><code>flashIndex</code><span> 刷新当前排位号</span></li><li><span>方法: </span><code>addTag</code><span> 添加标签(等位中/菜名)</span></li><li><span>方法: </span><code>refreshFoodWaitProcess</code><span> 刷新等待食物/进食进度条</span></li><li><span>方法: </span><code>refreshSitWaitProcess</code><span> 刷新等位进度条</span></li><li><span>方法: </span><code>grayTag</code><span> 将进度条变灰(当一个食物等待超时时)</span></li><li><span>方法: </span><code>addRecept</code><span> 点单后用户接收菜单</span></li><li><span>方法: </span><code>saveFood</code><span> 用户从厨师处获得一道菜</span></li><li><span>方法: </span><code>tryEating</code><span> 尝试去吃(如果有食物在等待被吃队列)</span></li><li><span>方法: </span><code>pay</code><span> 付款并走人</span></li><li><span>方法: </span><code>toSad</code><span> 一道菜都没有等到时</span></li><li><span>方法: </span><code>back</code><span> 离开</span></li></ul><h3 id='调试用api'><span>调试用API</span></h3><p><span>打开DevTools会显示API列表(输入</span><code>debugMod()</code><span>开启调试)</span></p><ul><li><code>debug.addCook()</code><span>: 增加厨师</span></li><li><code>debug.delCook(id)</code><span>: 删除厨师</span></li><li><code>debug.addCustom()</code><span>: 增加顾客</span></li><li><code>debug.delCustom(id)</code><span>: 删除厨师</span></li><li><code>debug.resetConf(config)</code><span>: 修改配置文件并重新加载(未经测试, 参数为要修改的部分配置)</span></li><li><code>debug.setMoney(val)</code><span>: 设置资产</span></li><li><code>debug.setToday(val)</code><span>: 设置日期</span></li></ul></div></div>
</body>
</html>